package com.askinhand.action;

import javax.annotation.Resource;

import org.apache.struts2.json.annotations.JSON;

import com.askinhand.bean.UserInfo;
import com.askinhand.service.IUserService;
import com.opensymphony.xwork2.ActionSupport;

public class UserInfoRetrieveAction extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	IUserService userService;
	UserInfo userinfo;
	String uid;
	


	
	@JSON(serialize=false)
	public String getUid() {
		return uid;
	}
	public void setUid(String uid) {
		this.uid = uid;
	}
	
	
	public UserInfo getUserinfo() {
		return userinfo;
	}
	public void setUserinfo(UserInfo userinfo) {
		this.userinfo = userinfo;
	}
	@JSON(serialize=false)
	public IUserService getUserService() {
		return userService;
	}
	
	@Resource
	public void setUserService(IUserService userService) {
		this.userService = userService;
	}
	
	
	

	public String execute(){
		
		userinfo = userService.userInfoRetrieve(uid);
		
		return "success";
	}
}
